package com.leapp.sk.ui.adapter

import android.content.Context
import com.example.mvp.adapter.BaseLibAdapter
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.bean.SearchClassListEntity
import com.leapp.sk.binder.adapter.join.SearchClassAdapterBinder
import com.leapp.sk.viewdelegate.adapter.join.SearchClassAdapterDelegate

/**
 * 搜索班级适配器
 * @author  chaohaipeng  on 2018/7/11.
 */
class SearchClassAdapter(context: Context, mlist: List<SearchClassListEntity>):BaseLibAdapter<SearchClassAdapterDelegate, SearchClassListEntity>(context,mlist) {
    /**
     * 数据
     */
    val mList = mlist
    /**
     * 上下文
     */
    val mContext = context
    override fun bindEvenListener(viewDelegate: SearchClassAdapterDelegate?, position: Int) {
    }

    override fun notifyView(viewDelegate: SearchClassAdapterDelegate?, position: Int) {
       viewDelegate?.setData(mContext,mList.get(position))
    }

    override fun getDelegateClass(): Class<SearchClassAdapterDelegate> {
        return SearchClassAdapterDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return SearchClassAdapterBinder()
    }


}